package decorator.coffee;

import decorator.coffee.concrete.Espresso;
import decorator.coffee.concrete.HouseBlend;
import decorator.coffee.decorate.Mocha;

public class StarbuzzCoffee {
    public static void main(String[] args) {
        Beverage beverage = new Espresso();
        System.out.println(beverage);

        //发现如果把toString写在父类里，就会直接打印父类属性，能不能通过反射获得子类的描述然后打印出来

        Beverage beverage1 = new HouseBlend();
        beverage1 = new Mocha(beverage1);
        beverage1 = new Mocha(beverage1);

        System.out.println(beverage1);

    }
}
